﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Universum.Unit.Tests
{
	/// <summary>
	/// Summary description for GuidConversionTests
	/// </summary>
	[TestClass]
	public class GuidConversionTests
	{
		
		[TestMethod]
		public void should_convert_guid_to_long()
		{
			Guid id = new Guid(1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0);
			id.ToLong().should_be_equal_to(8589934593L);
		}
		[TestMethod]
		public void should_convert_guid_to_int()
		{
			Guid id = new Guid(1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0);
			id.ToInt().should_be_equal_to(1);
			id = new Guid(2, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0);
			id.ToInt().should_be_equal_to(2);
		}
	}
}
